From fbd2b6b82305891b0f0f397adff11c109baad3d7 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Sat, 11 Apr 2026 15:43:05 +0200 Subject: [PATCH] signalTracker: Add debug function to get all signal trackers Signal trackers have been the source of difficult to identify leaks in the past. Having access to the list of all active signal trackers at run time without having to modify and rebuild gnome-shell can be very valuable in identifying the source of these leaks, especially since the steps required to trigger a leak might not always be obvious. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6423 Part-of: --- js/misc/signalTracker.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/misc/signalTracker.js b/js/misc/signalTracker.js index 60991d404..2a3e2b6c7 100644 --- a/js/misc/signalTracker.js +++ b/js/misc/signalTracker.js @@ -272,3 +272,12 @@ export function registerDestroyableType(gtype) { destroyableTypes.push(gtype); } + +/** + * A debug function that can be used to inspect signal trackers at run time + * + * @returns {Map} + */ +export function debugGetSignalTrackers() { + return SignalManager.getDefault()._signalTrackers; +} -- 2.39.5